using System;
using System.Xml;
using System.Text;


namespace MCMLXVII.BackEnd.Services.SystemConfiguration.Messages
{
    [Serializable()]
    [System.Xml.Serialization.XmlType(Namespace = "http://tempuri.org/")]
    public class msgSystemParameterInfo
    {
        const int ContentString = 1;
        const int ContentDateTime = 2;
        const int ContentInt = 3;
        const int ContentXML = 4;
        const int ContentFloat = 5;

        public msgSystemParameterInfo()
        {
        }

        public msgSystemParameterInfo(string Name, string Value)
        {
            _Name = Name;
            _ContentType = ContentString;
            _Value = Value;
        }

        public msgSystemParameterInfo(string Name, int Value)
        {
            _Name = Name;
            _ContentType = ContentInt;
            _Value = Value.ToString();
        }

        public msgSystemParameterInfo(string Name, float Value)
        {
            _Name = Name;
            _ContentType = ContentFloat;
            _Value = Value.ToString();
        }

        public msgSystemParameterInfo(string Name, DateTime Value)
        {
            _Name = Name;
            _ContentType = ContentDateTime;
            _Value = Value.ToShortDateString();
        }

        public msgSystemParameterInfo(string Name, XmlDocument Value)
        {
            _Name = Name;
            _ContentType = ContentXML;
            _Value = Value.OuterXml;
        }


        private string _Name;

        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        private int _ContentType;

        public int ContentType
        {
            get { return _ContentType; }
            set { _ContentType = value; }
        }
        private string _Value;

        public string Value
        {
            get { return _Value; }
            set { _Value = value; }
        }

    }
}
